import request from '@/config/axios'

// 标签组信息 VO
export interface TagGroupInfoVO {
  id: number // id
  name: string // 标签组名称
}

// 标签组信息 API
export const TagGroupInfoApi = {
  // 查询标签组信息分页
  getTagGroupInfoPage: async (params: any) => {
    return await request.get({ url: `/bpm/tag-group-info/page`, params })
  },

  // 获取所有标签组信息
  getAllTagGroupInfo: async () => {
    return await request.get({ url: `/bpm/tag-group-info/all`})
  },

  // 查询标签组信息详情
  getTagGroupInfo: async (id: number) => {
    return await request.get({ url: `/bpm/tag-group-info/get?id=` + id })
  },

  // 新增标签组信息
  createTagGroupInfo: async (data: TagGroupInfoVO) => {
    return await request.post({ url: `/bpm/tag-group-info/create`, data })
  },

  // 修改标签组信息
  updateTagGroupInfo: async (data: TagGroupInfoVO) => {
    return await request.put({ url: `/bpm/tag-group-info/update`, data })
  },

  // 删除标签组信息
  deleteTagGroupInfo: async (id: number) => {
    return await request.delete({ url: `/bpm/tag-group-info/delete?id=` + id })
  },

  // 导出标签组信息 Excel
  exportTagGroupInfo: async (params) => {
    return await request.download({ url: `/bpm/tag-group-info/export-excel`, params })
  },
}
